import time

from DrissionPage import ChromiumPage


page = ChromiumPage()
page.set.window.max()

tab_0 = page.new_tab('https://www.baidu.com')
tab_1 = page.new_tab(url='https://www.qq.com')

while True:
    # page.set.tab_to_front(tab_0)
    # time.sleep(5)
    # page.set.tab_to_front(tab_1)

    tab_0.set.activate()
    time.sleep(1)
    tab_1.set.activate()
    time.sleep(1)